From: Karl Heuer Date: Wed, 20 Apr 1994 00:24:59 +0000 (+0000) Subject: (read_avail_input): Don't retry read. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~92090 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=791587eebf6d9bd552262845aaa191b8523e5ac9;p=emacs.git (read_avail_input): Don't retry read. --- diff --git a/src/keyboard.c b/src/keyboard.c index 753ba028b4b..0c025d6b624 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3355,16 +3355,25 @@ read_avail_input (expected) if (nread == 0) kill (0, SIGHUP); #endif - /* Retry the read if it was interrupted. */ } - while (nread < 0 && (errno == EINTR + while ( + /* We used to retry the read if it was interrupted. + But this does the wrong thing when O_NDELAY causes + an EAGAIN error. Does anybody know of a situation + where a retry is actually needed? */ +#if 0 + nread < 0 && (errno == EAGAIN #ifdef EFAULT || errno == EFAULT #endif #ifdef EBADSLT || errno == EBADSLT #endif - )); + ) +#else + 0 +#endif + ); #ifndef FIONREAD #if defined (USG) || defined (DGUX)